package com.dragon.mmochat.message;

import com.dragon.mmochat.MmochatConstant;
import com.skymobi.buffer.SkymobiBuffer;
import com.skymobi.message.SkymobiModuleMessage;

public class Mmochat_SendMixWuDaoWordsToAllServer extends SkymobiModuleMessage {
	String serverName;
	int roleId;
	String name;
	String word;
	int levelRange;

	public Mmochat_SendMixWuDaoWordsToAllServer() {
		setMsgCode(MmochatConstant.MSGCODE_MMOCHAT_C_1_38);
	}

	public Mmochat_SendMixWuDaoWordsToAllServer(int dstId) {
		setDstId(dstId);
		setMsgCode(MmochatConstant.MSGCODE_MMOCHAT_C_1_38);
	}

	@Override
	protected void decodeBody(SkymobiBuffer in) {
		serverName = in.getPrefixedString(2);
		roleId = in.getInt();
		name = in.getPrefixedString(2);
		word = in.getPrefixedString(2);
		levelRange = in.getInt();
	}

	@Override
	protected void encodeBody(SkymobiBuffer out) {
		out.putPrefixedString(serverName, 2);
		out.putInt(roleId);
		out.putPrefixedString(name, 2);
		out.putPrefixedString(word, 2);
		out.putInt(levelRange);
	}

	public String getServerName() {
		return serverName;
	}

	public void setServerName(String serverName) {
		this.serverName = serverName;
	}

	public int getRoleId() {
		return roleId;
	}

	public void setRoleId(int roleId) {
		this.roleId = roleId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getWord() {
		return word;
	}

	public void setWord(String word) {
		this.word = word;
	}

	public int getLevelRange() {
		return levelRange;
	}

	public void setLevelRange(int levelRange) {
		this.levelRange = levelRange;
	}

}
